<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 
        今有鸡兔同笼 上有 二十头 下有六十四足 问鸡兔各有几何
     -->
</head>

<body>

</body>
<script>
    let x, y; //x表示鸡的个数，y表示兔子的个数
    let head = 24,
        foot = 64;
    y = (foot - head * 2) / 2;
    x = head - y;
    console.log('鸡有' + x + '只' + '兔有' + y + '只');
</script>

</html>